#include <physics/ValueLoader.h>
#include <Box2D/Common/b2Math.h>
#include <Box2D/Dynamics/b2Body.h>
#include <math/Vector2.h>

namespace physics
{

template <> bool ValueReader::Read <b2Vec2>(xml::Provider *provider, b2Vec2& value)
{
	ValueLoader <math::Vector2 <float> > loader;
	if(!provider->parse_object(&loader))
		return false;

	math::Vector2 <float> v = loader.GetValue();

	value.Set(v.x, v.y);
	return true;
}

}